#!/usr/bin/env python

import logging
import logging.config
# Set up the logger - if we don't read the config before loading the
# other modules, the logging doesn't

logging.config.fileConfig('getConsumption.config')
logger = logging.getLogger('allConverging.getConsumption')


import sys
import allconsuming.data
import allconsuming.filedac
import pprint

def main(args=None):
    if args == None:
        args = sys.argv[1:]

        if len(args) > 0:
            user = args[0]
        else:
            user = 'Hippopottoman'
        r = allconsuming.filedac.getUserConsumables(user)
        pprint.pprint(r)

    return 0


if __name__ == '__main__':
    sys.exit(main())

